package com.bwda.dsrs.systemservice.domain.form.user;

import com.bwda.dsrs.base.util.DateUtil;
import com.bwda.dsrs.systemservice.domain.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 用户表
 *
 * @author youzhen
 * @date 2019年4月28日
 */
@Data
@ApiModel(description = "用户表")
public class UserExcelImport {

	@ApiModelProperty(value = "用户编码")
	private Integer userId;

	@ApiModelProperty(value = "姓名")
	@Excel(name = "姓名")
	private String userName;

	@ApiModelProperty(value = "登录名")
	@Excel(name = "登录名")
	private String userCode;

	@ApiModelProperty(value = "工号")
	@Excel(name = "工号")
	private String empNo;

	@ApiModelProperty(value = "密码")
	@Excel(name = "密码")
	private String password;

	@ApiModelProperty(value = "手机号码")
	@Excel(name = "手机号码")
	private String mobilePhone;

	@ApiModelProperty(value = "邮箱地址")
	@Excel(name = "邮箱地址")
	private String email;

	@ApiModelProperty(value = "组织ID")
	@Excel(name = "组织ID")
	private Integer orgId;

	@ApiModelProperty(value = "备注")
	@Excel(name = "备注")
	private String remark;

	@ApiModelProperty(value = "0正常1冻结2离职3锁定4注销")
	private Integer userState;

	@ApiModelProperty(value = "创建时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date createTime;

	@ApiModelProperty(value = "创建人编号")
	private String createUserCode;

	@ApiModelProperty(value = "0未删除 1已删除")
	private Integer delFlag;

	@ApiModelProperty(value = "随机盐")
	private String salt;

	public Date getCreateTime() {
		if (createTime != null){
			return (Date) createTime.clone();
		}

		return null;
	}

	public void setCreateTime(Date createTime) {
		if (createTime != null){
			this.createTime = (Date) createTime.clone();
		}
	}
}